<template>
  <Tabs @on-click="clickTabPane" name="project-module-tabs" :animated="true">
    <TabPane name="project" label="项目管理" tab="project-module-tabs">
      <Project ref="project"></Project>
    </TabPane>
    <TabPane name="module" label="模块管理" tab="project-module-tabs">
      <Module ref="module"></Module>
    </TabPane>
  </Tabs>
</template>

<script>
import Module from "@/view/components/HttpAutoTestService/module";
import Project from "@/view/components/HttpAutoTestService/project";

export default {
  name: "project-module",
  components: {
    Project,
    Module,
  },
  methods: {
    clickTabPane(val) {
      this.$refs[val].search();
      // this.$refs["module"].showDrawer = val == "module" ? true : false;
      if (val === "module") {
        this.$refs[val].getProjectNames();
      }
    },
  },
};
</script>

<style scoped>
</style>
